require(ggplot2)
## Loading required package: ggplot2
require(scales)
## Loading required package: scales
require(lme4)
## Loading required package: lme4
## Loading required package: Matrix
require(reshape2)
## Loading required package: reshape2
require(plyr)
## Loading required package: plyr
require(dplyr)
## Loading required package: dplyr
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:plyr':
##
## arrange, count, desc, failwith, id, mutate, rename, summarise,
## summarize
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(tidyr)
##
## Attaching package: 'tidyr'
## The following object is masked from 'package:reshape2':
##
## smiths
## The following object is masked from 'package:Matrix':
##
## expand
require(ggbeeswarm)
## Loading required package: ggbeeswarm
require(latex2exp)
## Loading required package: latex2exp
require(ggpubr)
## Loading required package: ggpubr
## Loading required package: magrittr
##
## Attaching package: 'magrittr'
## The following object is masked from 'package:tidyr':
##
## extract
##
## Attaching package: 'ggpubr'
## The following object is masked from 'package:plyr':
##
## mutate
require(grid)
## Loading required package: grid
require(gridExtra)
## Loading required package: gridExtra
##
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
##
## combine
require(stringr)
## Loading required package: stringr
require(data.table)
## Loading required package: data.table
##
## Attaching package: 'data.table'
## The following objects are masked from 'package:dplyr':
##
## between, first, last
## The following objects are masked from 'package:reshape2':
##
## dcast, melt
require(abind)
## Loading required package: abind
require(tidyverse)
## Loading required package: tidyverse
## ── Attaching packages ──────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.2.1 ──
## ✔ tibble 2.1.3 ✔ purrr 0.3.2
## ✔ readr 1.3.1 ✔ forcats 0.4.0
## ── Conflicts ─────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::arrange() masks plyr::arrange()
## ✖ data.table::between() masks dplyr::between()
## ✖ readr::col_factor() masks scales::col_factor()
## ✖ gridExtra::combine() masks dplyr::combine()
## ✖ purrr::compact() masks plyr::compact()
## ✖ dplyr::count() masks plyr::count()
## ✖ purrr::discard() masks scales::discard()
## ✖ tidyr::expand() masks Matrix::expand()
## ✖ magrittr::extract() masks tidyr::extract()
## ✖ dplyr::failwith() masks plyr::failwith()
## ✖ dplyr::filter() masks stats::filter()
## ✖ data.table::first() masks dplyr::first()
## ✖ dplyr::id() masks plyr::id()
## ✖ dplyr::lag() masks stats::lag()
## ✖ data.table::last() masks dplyr::last()
## ✖ ggpubr::mutate() masks dplyr::mutate(), plyr::mutate()
## ✖ dplyr::rename() masks plyr::rename()
## ✖ purrr::set_names() masks magrittr::set_names()
## ✖ dplyr::summarise() masks plyr::summarise()
## ✖ dplyr::summarize() masks plyr::summarize()
## ✖ purrr::transpose() masks data.table::transpose()
results <- readRDS('./data/real/full_results_pipeline.rds')
single.ds <- lapply(results, function(res) {
res %>%
subset(Dataset == "BNU1")
})
Statistic on the graphs, vs. MGC/Dcorr for age (regression) and sex (classification) task on the graphs embedded using the strategy indicated
stat.vs.perf <- merge(results$stat, results$prob, by=c("Reg", "FF", "Scr", "GSR", "Parcellation", "xfm", "Dataset"))
lapply(unique(stat.vs.perf$Dataset), function(ds) {
lapply(unique(stat.vs.perf$alg), function(al) {
stat.vs.perf %>%
subset(alg == al & Dataset == ds) %>%
ggplot(aes(x=stat.x, y=stat.y, color=xfm)) +
geom_point() +
facet_grid(task ~ embed, scales="free_y") +
theme_bw() +
xlab("Discriminability") +
ylab("Task Performance") +
ggtitle(sprintf("Alg=%s, Dataset=%s", as.character(al), as.character(ds)))
})})
## [[1]]
## [[1]][[1]]
##
## [[1]][[2]]
##
## [[1]][[3]]
##
## [[1]][[4]]
##
##
## [[2]]
## [[2]][[1]]
##
## [[2]][[2]]
##
## [[2]][[3]]
##
## [[2]][[4]]
##
##
## [[3]]
## [[3]][[1]]
##
## [[3]][[2]]
##
## [[3]][[3]]
##
## [[3]][[4]]
##
##
## [[4]]
## [[4]][[1]]
##
## [[4]][[2]]
##
## [[4]][[3]]
##
## [[4]][[4]]
##
##
## [[5]]
## [[5]][[1]]
##
## [[5]][[2]]
##
## [[5]][[3]]
##
## [[5]][[4]]
##
##
## [[6]]
## [[6]][[1]]
##
## [[6]][[2]]
##
## [[6]][[3]]
##
## [[6]][[4]]
##
##
## [[7]]
## [[7]][[1]]
##
## [[7]][[2]]
##
## [[7]][[3]]
##
## [[7]][[4]]
##
##
## [[8]]
## [[8]][[1]]
##
## [[8]][[2]]
##
## [[8]][[3]]
##
## [[8]][[4]]
##
##
## [[9]]
## [[9]][[1]]
##
## [[9]][[2]]
##
## [[9]][[3]]
##
## [[9]][[4]]
##
##
## [[10]]
## [[10]][[1]]
##
## [[10]][[2]]
##
## [[10]][[3]]
##
## [[10]][[4]]
##
##
## [[11]]
## [[11]][[1]]
##
## [[11]][[2]]
##
## [[11]][[3]]
##
## [[11]][[4]]
##
##
## [[12]]
## [[12]][[1]]
##
## [[12]][[2]]
##
## [[12]][[3]]
##
## [[12]][[4]]
##
##
## [[13]]
## [[13]][[1]]
##
## [[13]][[2]]
##
## [[13]][[3]]
##
## [[13]][[4]]
##
##
## [[14]]
## [[14]][[1]]
##
## [[14]][[2]]
##
## [[14]][[3]]
##
## [[14]][[4]]
##
##
## [[15]]
## [[15]][[1]]
##
## [[15]][[2]]
##
## [[15]][[3]]
##
## [[15]][[4]]
##
##
## [[16]]
## [[16]][[1]]
##
## [[16]][[2]]
##
## [[16]][[3]]
##
## [[16]][[4]]
Statistic on the graphs, vs. MGC/Dcorr for age (regression) and sex (classification) task on the graphs
stat.vs.perf <- merge(results$stat, results$dcor, by=c("Reg", "FF", "Scr", "GSR", "Parcellation", "xfm", "Dataset"))
lapply(unique(stat.vs.perf$Dataset), function(ds) {
lapply(unique(stat.vs.perf$alg), function(al) {
stat.vs.perf %>%
subset(alg == al & Dataset == ds) %>%
ggplot(aes(x=stat.x, y=stat.y, color=xfm)) +
geom_point() +
facet_grid(task ~ method, scales="free_y") +
theme_bw() +
xlab("Discriminability") +
ylab("Task Performance") +
ggtitle(sprintf("Alg=%s, Dataset=%s", as.character(al), as.character(ds)))
})})
## [[1]]
## [[1]][[1]]
##
## [[1]][[2]]
##
## [[1]][[3]]
##
## [[1]][[4]]
##
##
## [[2]]
## [[2]][[1]]
##
## [[2]][[2]]
##
## [[2]][[3]]
##
## [[2]][[4]]
##
##
## [[3]]
## [[3]][[1]]
##
## [[3]][[2]]
##
## [[3]][[3]]
##
## [[3]][[4]]
##
##
## [[4]]
## [[4]][[1]]
##
## [[4]][[2]]
##
## [[4]][[3]]
##
## [[4]][[4]]
##
##
## [[5]]
## [[5]][[1]]
##
## [[5]][[2]]
##
## [[5]][[3]]
##
## [[5]][[4]]
##
##
## [[6]]
## [[6]][[1]]
##
## [[6]][[2]]
##
## [[6]][[3]]
##
## [[6]][[4]]
##
##
## [[7]]
## [[7]][[1]]
##
## [[7]][[2]]
##
## [[7]][[3]]
##
## [[7]][[4]]
##
##
## [[8]]
## [[8]][[1]]
##
## [[8]][[2]]
##
## [[8]][[3]]
##
## [[8]][[4]]
##
##
## [[9]]
## [[9]][[1]]
##
## [[9]][[2]]
##
## [[9]][[3]]
##
## [[9]][[4]]
##
##
## [[10]]
## [[10]][[1]]
##
## [[10]][[2]]
##
## [[10]][[3]]
##
## [[10]][[4]]
##
##
## [[11]]
## [[11]][[1]]
##
## [[11]][[2]]
##
## [[11]][[3]]
##
## [[11]][[4]]
##
##
## [[12]]
## [[12]][[1]]
##
## [[12]][[2]]
##
## [[12]][[3]]
##
## [[12]][[4]]
##
##
## [[13]]
## [[13]][[1]]
##
## [[13]][[2]]
##
## [[13]][[3]]
##
## [[13]][[4]]
##
##
## [[14]]
## [[14]][[1]]
##
## [[14]][[2]]
##
## [[14]][[3]]
##
## [[14]][[4]]
##
##
## [[15]]
## [[15]][[1]]
##
## [[15]][[2]]
##
## [[15]][[3]]
##
## [[15]][[4]]
##
##
## [[16]]
## [[16]][[1]]
##
## [[16]][[2]]
##
## [[16]][[3]]
##
## [[16]][[4]]
##
##
## [[17]]
## [[17]][[1]]
##
## [[17]][[2]]
##
## [[17]][[3]]
##
## [[17]][[4]]
##
##
## [[18]]
## [[18]][[1]]
##
## [[18]][[2]]
##
## [[18]][[3]]
##
## [[18]][[4]]